
class Money(object):

    def __init__(self,money):
        self.__money = money

    def getMoney(self):
        return self.__money

    def setMoney(self,value):
        if isinstance(value,int):
            self.__money = value
        else:
            print("error type")

    MONEY = property(getMoney,setMoney)

m = Money(100)
print(m.MONEY)
m.MONEY = 150
print(m.MONEY)
m.MONEY = 'a'
print(m._Money__money) # 名称重整
print(m.__dict__)
m.__name = 'kobe'
print(m.__dict__)
print(Money.__dict__)